<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
        function   area(  r){
          var  area1=Math.PI*r*r;
          alert("圆的面积为:"+area1);
         }
       var   r=prompt("请输入半径大小：");
  area(r);
    
    
    
    
    </script>
    
</body>
</html>